package com.qingfeng.medical.biz.order.domain.ro;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.qingfeng.medical.biz.order.domain.enums.OrderStatusEnum;
import com.qingfeng.medical.biz.order.domain.enums.VisitStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 订单表
 *
 * @author 清风学Java
 * @date 2023-04-28 17:10:43
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "订单表")
public class OrderInfoRo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "订单交易号")
    private String outTradeNo;

    @ApiModelProperty(value = "科室门诊id ")
    private Long depId;

    @ApiModelProperty(value = "科室名称")
    private String depName;

    @ApiModelProperty(value = "门诊名")
    private String patientName;

    @ApiModelProperty(value = "排班Id")
    private Long scheduleId;

    @ApiModelProperty(value = "医生Id")
    private Long doctorId;

    @ApiModelProperty(value = "医生姓名")
    private String doctorName;

    @ApiModelProperty(value = "医生职称")
    private String position;

    @ApiModelProperty(value = "预约日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date reserveDate;

    @ApiModelProperty(value = "就诊人id")
    private Long patientId;

    @ApiModelProperty(value = "就诊人名称")
    private String patientUserName;

    @ApiModelProperty(value = "就诊人手机")
    private String patientPhone;

    @ApiModelProperty(value = "预约号序")
    private Integer number;

    @ApiModelProperty(value = "建议取号时间")
    private String fetchTime;

    @ApiModelProperty(value = "取号地点")
    private String fetchAddress;

    @ApiModelProperty(value = "挂号费")
    private Double amount;

    @ApiModelProperty(value = "退号时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime quitTime;

    @ApiModelProperty(value = "订单状态(待支付，已支付，已退号)")
    private OrderStatusEnum orderStatus;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @ApiModelProperty(value = "就诊记录主键")
    private Long visitId;

    @ApiModelProperty(value = "就诊状态")
    private VisitStatusEnum visitStatus;
}
